package de.toolschmied.jjas.client.cms.actions;

import com.google.gwt.dom.client.Style.TextAlign;
import com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment;


public enum Alignment implements SelectableType {

	LEFT 	(TextAlign.LEFT, 	TextAlignment.LEFT),
	CENTER 	(TextAlign.CENTER, 	TextAlignment.CENTER),
	RIGHT 	(TextAlign.RIGHT,	TextAlignment.RIGHT);
	
	public final TextAlign textAlign;
	public final TextAlignment textAlignment;
	private final String buttonImageURL;
	
	private Alignment(TextAlign textAlign, TextAlignment textAlignment) {
		this.textAlign = textAlign;
		this.textAlignment = textAlignment;
		this.buttonImageURL = "images/" + textAlign.getCssName() + ".png";
	}

	@Override
	public String getButtonImageURL() {
		return buttonImageURL;
	}

	@Override
	public String getName() {
		return textAlign.getCssName();
	}

	@Override
	public String getTooltip() {
		return "Align text to the " + getName();
	}
	
}
